import request from '@/utils/request/base'

// 商机信息
export function customerList(data) {
    return request({
      url: '/business/page',
      method: 'post',
      data
    })
}

// 躺猪招商员工信息
export function wokerList(data) {
  return request({
    url: '/sales/man/page',
    method: 'post',
    data
  })
}

// 获取片区分组列表(用户分配分组和用户查询)
export function areaList() {
  return request({
    url: '/sales/man/group/options',
    method: 'get',
  })
}
// 重新分配商机
export function updataBusiness(params) {
  return request({
    url: '/business/update/sales',
    method: 'get',
    params
  })
}
// 商机的原始地区信息
export function businessRef(url,data) {
  return request({
    url,
    method: 'post',
    data
  });
}
// 省市区数据
export function areaMessage(params) {
  return request({
    url: '/resource/area',
    method: 'get',
    params
  })
}

// 确认转介
export function sureBusinessRef(id,data) {
  return request({
    url: '/business/update/referrals/' + id,
    method: 'post',
    data
  });
}

// 转介地区的员工人数
export function getAreaWoker(data) {
  return request({
    url: '/business/referrals/exist/',
    method: 'post',
    data
  });
}
// 跟进日志数据
export function businessDailyTask(id) {
  return request({
    url: '/business/log/list/' + id,
    method: 'post'
  })
}